home *** CD-ROM | disk | FTP | other *** search
/ Dr. Windows 3 / dr win3.zip / dr win3 / UTILITY1 / HK10.ZIP / HKSRC.ZIP / MAKEFILE.MSC < prev   
Text File  |  1993-07-12  |  3KB  |  92 lines

  1. #==========================================================
  2. # Makefile for Win EXEs under Microsoft C 6.0
  3. # Copyright (c) 1993 Douglas Boling
  4. #==========================================================
  5. #----------------------------------------------------------
  6. # Target filename
  7. #----------------------------------------------------------
  8. NAME = hk
  9.  
  10. #----------------------------------------------------------
  11. # Define DEBUG = 1 to add debug info to EXE
  12. #----------------------------------------------------------
  13. DEBUG = 0
  14.  
  15. #----------------------------------------------------------
  16. # Define MYWIN31 = 1 for Windows 3.1 apps
  17. #----------------------------------------------------------
  18. MYWIN31 = 1
  19.  
  20. #----------------------------------------------------------
  21. # C compiler switches
  22. #
  23. # -c    Compile, no link
  24. # -Gsw     No Stack check, Compile for Windows
  25. # -G2   Use 286 instructions (Win 3.1 only)
  26. # -Ow   Optimize. Assume no aliases
  27. # -W3   Print warnings to level 3
  28. # -Zp   Pack Structures or...
  29. # -Zpi    If Debug info needed
  30. # -Od     Disable Optimization
  31. #----------------------------------------------------------
  32. !if $(DEBUG)
  33. CSWITCH = -c -Gsw -Ow -W3 -Zpi -Od
  34. !else
  35. CSWITCH = -c -Gsw -Ow -W3 -Zp 
  36. !endif
  37.  
  38. !if $(MYWIN31)
  39. CSWITCH = $(CSWITCH) -G2 
  40. !else
  41. CSWITCH = $(CSWITCH) -D WINVER=0x0300
  42. !endif
  43.  
  44. #----------------------------------------------------------
  45. # Link Switches
  46. #
  47. # /Align:16  Align segments on 16 byte boundries 
  48. # /CO        If debug info needed
  49. #----------------------------------------------------------
  50. !if $(DEBUG)
  51. LSWITCH = /CO /align:16
  52. !else
  53. LSWITCH = /align:16
  54. !endif
  55.  
  56. #----------------------------------------------------------
  57. # Lib files
  58. #
  59. # /nod     No defaults
  60. # slibcew  Small model lib for Windows
  61. # libw     Windows API lib
  62. # commdlg  Windows Common Dialog Box lib
  63. #----------------------------------------------------------
  64. LIBS = /nod slibcew libw commdlg
  65.  
  66. #----------------------------------------------------------
  67. # Resource Compiler switches
  68. # 30   Require at least Win 3.0
  69. # 31   Require at least Win 3.1
  70. #----------------------------------------------------------
  71. !if $(MYWIN31)
  72. RCSWITCH = -31
  73. !else
  74. RCSWITCH = -30
  75. !endif
  76.  
  77. #----------------------------------------------------------
  78. # Make EXE
  79. #----------------------------------------------------------
  80. $(NAME).exe : $(NAME).obj $(NAME).def $(NAME).res
  81.     link $(LSWITCH) $(NAME), $(NAME).exe, NUL, $(LIBS), $(NAME)
  82.     rc $(RCSWITCH) $(NAME).res 
  83.  
  84. $(NAME).obj : $(NAME).c $(NAME).h
  85.     cl $(CSWITCH) $(NAME).c
  86.  
  87. $(NAME).res : $(NAME).rc $(NAME).h $(NAME).ico
  88.     rc -r $(NAME).rc
  89.  
  90.  
  91.  
  92.